<template>
	<div class="mall_goods_cart_tools">
		<ul>
			<li @click="selectAll($event)" class="select_all">
				<input type="checkbox" :checked="selectAllGoods" />
				全选
			</li>
			<li class="price_total">
				合计：￥{{priceTotal}}
			</li>
			<li>
				<a @click="buyGoodsHandle($event)" class="buy_goods">结算({{goodsCount}})</a>
			</li>
		</ul>
	</div>
</template>
<script>
	export default{
		name: "MallGoodsDetailTools",
		props:["priceTotal", "buyGoods", "goodsCount", "selectAllGoods"],
		data: function(){
			return{

			}
		},
		methods: {
			selectAll(e){
				this.$emit("setSelectAllGoods", this.selectAllGoods ? false : true);
			},
			buyGoodsHandle(e) {

			}
		}
	}
</script>
<style lang="less">
	@base:23.44/1rem;
	.mall_goods_cart_tools{
		position: fixed;
		bottom:0;
		left:0;
		right:0;
		z-index:1000;
		background-color:#fff;
		ul{
			display:flex;
			li{
				width:33.3333%;
				background-color:#fff;
				border-top:1/@base solid #efefef;
				font-size: 22/@base;
				&.price_total{
					text-align: center;
					padding:20/@base;
				}
				&.select_all{
					text-align: center;
					padding:20/@base;
				}
				a{
					display: block;
					padding:20/@base;
					text-align: center;
					font-size: 22/@base;
					&.buy_goods{
						background-color: #ff0000;
						color:#fff;
						font-weight: 700;
					}
				}
			}
		}
	}
</style>